/**
 * Created by victor on 2016/9/27.
 */
'use strict'

import React from "react"
import Comment from "./Comment"

class CommentList extends React.Component{
    render() {
        let marketDataNode = this.props.data.map(marketData => {

            return (
                <Comment key={marketData.market_id} marketId={marketData.market_id} keyword={marketData.keyword} marketName={marketData.market_name} keywordCount={marketData.keyword_count}></Comment>
            );
        });
        return (
            <div className="commentList">
                <table className="table table-bordered">
                    <thead>
                    <tr>
                        <th>ID</th>
                        <th>关键词</th>
                        <th>市场</th>
                        <th>刷机次数</th>
                    </tr>
                    {marketDataNode}
                    </thead>
                </table>
            </div>
        );
    }
}

export {CommentList as default};
